<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="featureProductList.title"/></title>
    <meta name="heading" content="<fmt:message key='featureProductList.heading'/>"/>
    <meta name="menu" content="MaterialMenu"/>
    <script type="text/javascript">
        window.onload = function() {
            init();
            Effect.SlideDown('divNewFeatureProductForm');
            Effect.SlideDown('divDeleteFeatureProductForm');
        };
    </script>
</head>
<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
           onclick="Effect.SlideUp('divDeleteFeatureProductForm'); Effect.SlideDown('divNewFeatureProductForm'); return false;"
           value="<fmt:message key="button.add"/>"/>
<input type="button" style="margin-right: 5px"
           onclick="Effect.SlideUp('divNewFeatureProductForm'); Effect.SlideDown('divDeleteFeatureProductForm'); return false;"
           value="<fmt:message key="button.delete"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<s:set name="featureProducts" value="featureProducts" scope="request"/>
<br><br>
<display:table style="width:300px" name="dNames" class="table" requestURI="" id="featureProductList" export="true" pagesize="25">
    <display:column style="width:0px" sortable="true"
                    paramId="id" paramProperty="id" />
    <display:column property="nameLang" sortable="true" titleKey="featureProduct.name" />
    <display:column property="disDescriptions" sortable="true" titleKey="featureProduct.descriptions" style="width:180px"/>

    <display:setProperty name="paging.banner.item_name" value="featureProduct"/>
    <display:setProperty name="paging.banner.items_name" value="featureProducts"/>

    <display:setProperty name="export.excel.filename" value="FeatureProduct List.xls"/>
    <display:setProperty name="export.csv.filename" value="FeatureProduct List.csv"/>
    <display:setProperty name="export.pdf.filename" value="FeatureProduct List.pdf"/>
    <display:setProperty name="paging.banner.all_items_found" value=""/>
    <display:setProperty name="paging.banner.some_items_found" value=""/>

</display:table>
<div id="divNewFeatureProductForm" style="border-width:thin; border-color:gray; position:absolute; top:40px; left:380px; display: none;">
    <h1><fmt:message key="featureProduct.new" /></h1>
    <s:form id="featureProductForm" action="saveFeatureProduct" method="post" validate="true">
        <s:hidden name="featureProduct.id" value="%{featureProduct.id}"/>
        <s:textfield key="featureProduct.name" cssClass="text medium" maxLength="40"/>
        <s:textfield key="featureProduct.description" required="true" cssClass="text medium" maxLength="40"/>
<s:textfield key="featureProduct.nameEs" cssClass="text medium" maxLength="40"/>
        <s:textfield key="featureProduct.descriptionEs" required="true" cssClass="text medium" maxLength="40"/>

<li class="buttonBar bottom">
            <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
            <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
        </li>

    </s:form>
</div>

<div id="divDeleteFeatureProductForm" style="border-width:thin; border-color:gray; position:absolute; top:40px; left:380px; display: none;">
    <h1><fmt:message key="featureProduct.delete" /></h1>

    <s:form id="deletefeatureProductForm" action="deleteDDescription" method="get" validate="true">

        <s:doubleselect
            name="featureProductName"          doubleName="featureProductDescription"
            list="featureProductNames"         doubleList="featureProductDescriptions"
            listKey="name"                    doubleListKey="name"
            listValue="nameLang"                doubleListValue="nameLang"/>
        <s:submit cssClass="button" method="deleteFeatureProductDescription" key="button.delete" onclick="return confirmDelete('featureProduct')" theme="simple"/>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
        
    </s:form>
</div>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("featureProductList");
</script>